<?php
/* @var $this CoursetemplateController */
/* @var $model Coursetemplate */
/* @var $form CActiveForm */
$this->main_menu = MenuHelper::getArrayForMainMenu(false, false, false, true);
?>

<?php
//$this->menu = MenuHelper::getArrayForCoreDataMenu();
$this->widget('bootstrap.widgets.TbTabs', array(
	'type'=>'tabs', // 'tabs' or 'pills'
	'tabs'=>MenuHelper::getArrayForCoreDataMenu(),
));
?>

<?php /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'horizontalForm',
	'type'=>'horizontal',
)); ?>
     
<fieldset>
     
     <?php 
        $categories = $this->modelToArray(Category::model()->findAll()); 
        $types = $this->modelToArray(Type::model()->findAll());
        $class_time = $this->modelToArray(ClassTime::model()->findAll());
        $graduation = $this->modelToArray(Graduation::model()->findAll());
     ?>
    <?php // echo $form->checkBoxRow($model, 'is_module', array('disabled'=>false)); ?>
    <?php echo $form->dropDownListRow($model, 'category1', array_combine($categories, $categories)); ?>         
    <?php echo $form->dropDownListRow($model, 'category2', array_combine($categories, $categories)); ?>    
    <?php echo $form->dropDownListRow($model, 'type', array_combine($types, $types)); ?>    
    <?php echo $form->textFieldRow($model, 'title'); ?>
    <?php echo $form->html5EditorRow($model, 'requirement', array('class'=>'span4', 'rows'=>5, 'height'=>'200', 'options'=>array('color'=>true))); ?>
    <?php echo $form->html5EditorRow($model, 'content', array('class'=>'span4', 'rows'=>5, 'height'=>'200', 'options'=>array('color'=>true))); ?> 
    <?php echo $form->html5EditorRow($model, 'description', array('class'=>'span4', 'rows'=>5, 'height'=>'200', 'options'=>array('color'=>true))); ?> 
    <?php echo $form->textFieldRow($model, 'duration'); ?>
    <?php echo $form->textFieldRow($model, 'ue'); ?>
    <?php echo $form->textFieldRow($model, 'min_participants'); ?>
    <?php echo $form->textFieldRow($model, 'max_participants'); ?>
    <?php echo $form->textFieldRow($model, 'price'); ?> 
    <?php echo $form->dropDownListRow($model, 'class_time', array_combine($class_time, $class_time)); ?>   
    <?php echo $form->dropDownListRow($model, 'graduation', array_combine($graduation, $graduation)); ?>    
    <?php echo $form->checkBoxRow($model, 'statistics', array('disabled'=>false)); ?>

</fieldset>

     
<div class="form-actions">
    <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'type'=>'primary', 'label'=>'Speichern')); ?>
    <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'reset', 'label'=>'Zurücksetzen')); ?>
</div>
     
<?php $this->endWidget(); ?>